package org.longgang.bean;

import java.io.Serializable;
import java.util.Date;

import org.apache.ibatis.type.Alias;

/**
 * company
 * 
 * @author
 */
@Alias("company")
public class Company implements Serializable {
	/**
	 * 公司id
	 */
	private Integer companyid;

	/**
	 * 公司账户名字
	 */
	private String name;

	/**
	 * 公司邮箱
	 */
	private String email;

	/**
	 * 公司登录密码
	 */
	private String password;

	/**
	 * 手机号
	 */
	private String phone;

	/**
	 * 公司注册时间
	 */
	private Date registertime;

	/**
	 * 备用
	 */
	private String b1;

	/**
	 * 备用
	 */
	private String b2;

	private static final long serialVersionUID = 1L;

	public Integer getCompanyId() {
		return companyid;
	}

	public void setCompanyId(Integer companyid) {
		this.companyid = companyid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Date getRegisterTime() {
		return registertime;
	}

	public void setRegisterTime(Date registertime) {
		this.registertime = registertime;
	}

	public String getB1() {
		return b1;
	}

	public void setB1(String b1) {
		this.b1 = b1;
	}

	public String getB2() {
		return b2;
	}

	public void setB2(String b2) {
		this.b2 = b2;
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		Company other = (Company) that;
		return (this.getCompanyId() == null ? other.getCompanyId() == null
				: this.getCompanyId().equals(other.getCompanyId()))
				&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
				&& (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
				&& (this.getPassword() == null ? other.getPassword() == null
						: this.getPassword().equals(other.getPassword()))
				&& (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
				&& (this.getRegisterTime() == null ? other.getRegisterTime() == null
						: this.getRegisterTime().equals(other.getRegisterTime()))
				&& (this.getB1() == null ? other.getB1() == null : this.getB1().equals(other.getB1()))
				&& (this.getB2() == null ? other.getB2() == null : this.getB2().equals(other.getB2()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
		result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
		result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
		result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
		result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
		result = prime * result + ((getRegisterTime() == null) ? 0 : getRegisterTime().hashCode());
		result = prime * result + ((getB1() == null) ? 0 : getB1().hashCode());
		result = prime * result + ((getB2() == null) ? 0 : getB2().hashCode());
		return result;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", companyid=").append(companyid);
		sb.append(", name=").append(name);
		sb.append(", email=").append(email);
		sb.append(", password=").append(password);
		sb.append(", phone=").append(phone);
		sb.append(", registertime=").append(registertime);
		sb.append(", b1=").append(b1);
		sb.append(", b2=").append(b2);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}

	public Company() {
		super();
	}

	public Company(Integer companyid, String name, String email, String password, String phone, Date registertime,
			String b1, String b2) {
		super();
		this.companyid = companyid;
		this.name = name;
		this.email = email;
		this.password = password;
		this.phone = phone;
		this.registertime = registertime;
		this.b1 = b1;
		this.b2 = b2;
	}

	public Company(String name, String password, String email) {
		super();
		this.name = name;
		this.password = password;
		this.email = email;
	}

	public Company(Integer companyid) {
		super();
		this.companyid = companyid;
	}

}